<template>
	<view class="content">

		<view class="box" v-if="list" v-for="item in list" :key="item.id">
			<image :src="item.pic" mode=""></image>
			<view class="text">
				<view class="title">
					{{item.name}}
				</view>
				<view class="price">
					￥{{item.price}}
				</view>
			</view>
		</view>
		<view v-else>
			暂无
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			var goods = uni.getStorageSync("goods")
			if (goods) {
				this.list = goods
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 30rpx;

		.box {
			background-color: #fff;
			border-radius: 20rpx;
			margin-bottom: 30rpx;
			padding: 20rpx;
			display: flex;

			.text {
				font-size: 24rpx;
				margin-left: 30rpx;
				width: 80%;
				display: flex;
				justify-content: space-around;
				flex-direction: column;
			}

			image {
				width: 160rpx;
				height: 160rpx;
				border-radius: 20rpx;
			}

			.price {
				font-size: 32rpx;
				color: #1c4b47;
				font-weight: 600;
			}
		}
	}
</style>
